<template>
	<div>
		<!--告警规则 规则描述 active 选择-->
		<baseSelect 
			ref="baseSelect"
			:defaultValue="defaultValue" 
			:optionList="options" 
			:filterable="true"
			placeholder="请选择"
			@change="changeHandel"></baseSelect>
	</div>
</template>

<script>
import baseSelect from "@/view/components/select/select";
export default {
	components: {
		baseSelect
	},
	props: [
		"defaultValue",
		"monitor_norm"
	],
	data() {
		return {
			options:[]
		}
	},
	mounted() {
	},
	watch:{
	    monitor_norm(){
           if(this.monitor_norm.length){
			this.options  =  this.monitor_norm.map(el=>{
				   return{
					   label: el.name,
				       value: el.value
				   }
			   })
			   console.log(this.options)
		   }
		}
	},
	methods: {
		changeHandel(name, v, selectedArr) {
			this.$emit("change", v, selectedArr)
		},
		reset() {
			this.$refs.baseSelect.reset()
		}
	}
}
</script>

<style>
</style>